<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>登录</title>
<meta name="keywords"  content="KEYWORDS..." />
<meta name="description" content="DESCRIPTION..." />
<meta name="author" content="DeathGhost" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name='apple-touch-fullscreen' content='yes'>
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta name="format-detection" content="address=no">
<link rel="icon" href="/1/images/icon/favicon.ico" type="image/x-icon">
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="/1/images/icon/apple-touch-icon-57x57-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="/1/images/icon/apple-touch-icon-120x120-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="196x196" href="/1/images/icon/apple-touch-icon-196x196-precomposed.png">
<meta name="viewport" content="initial-scale=1, width=device-width, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" type="text/css" href="/1/css/style.css" />
<script src="/1/js/jquery.js"></script>
<script src="/vendor/layer/layer.js"></script>
</head>
<body>
<section class="formLogo">
 <h2 style="font-size:16px">{{$agent['shop_name']}}</h2>
</section>
<ul class="formarea">
 <li>
  <label class="lit">账号：</label>
  <input type="text" id="username" placeholder="手机号码" class="textbox"/>
 </li>
 <li>
  <label class="lit">密码：</label>
  <input type="password" id="password" placeholder="登陆密码" class="textbox"/>
 </li>
 <li class="liLink lg_liLink">
  {{--<span><label><input type="checkbox"/>记住密码</label></span>--}}
  <span><a href="/register">新用户注册</a></span>
  {{--<span><a href="/1/find_pwd.html">忘记密码?</a></span>--}}
 </li>
 <li>
  <input type="button" onclick="login()" value="立即登录">
 </li>
</ul>
<div style="height:1.2rem;"></div>
@include('home.1.footer')
<script>
    function login() {
        layer.load(1, {shade: [0.2,'#999']});
        $.post('', {
            username: $('#username').val(),
            password: $('#password').val()
        }, function (res) {
            layer.closeAll();
            if (res.status === 1) {
                layer.msg(res.info, {time: 1200}, function () {
                    var redirectUrl = document.referrer;
                    if (!redirectUrl || /\/login/.test(redirectUrl) || /\/register/.test(redirectUrl))
                        redirectUrl = '/home/user/index';
                    location.href=redirectUrl;
                });
            } else {
                layer.msg(res.info, {time: 1200});
            }
        }, 'json');
    }
</script>
</body>
</html>
